{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from bert import tokenization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/bert/tokenization.py:125: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "tokenizer = tokenization.FullTokenizer(\n",
    "      vocab_file='MASS.wordpiece', do_lower_case=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import random\n",
    "\n",
    "rng = random.Random(12345)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "max_seq_length = 300\n",
    "dupe_factor = 5\n",
    "short_seq_prob = 0.1\n",
    "masked_lm_prob = 0.2\n",
    "max_predictions_per_seq = 20\n",
    "eos_id = 1\n",
    "\n",
    "vocab_words = list(tokenizer.vocab.keys())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "import collections\n",
    "import tensorflow as tf\n",
    "from tqdm import tqdm\n",
    "\n",
    "maxlen = max_seq_length\n",
    "\n",
    "def create_int_feature(values):\n",
    "    feature = tf.train.Feature(\n",
    "        int64_list = tf.train.Int64List(value = list(values))\n",
    "    )\n",
    "    return feature\n",
    "\n",
    "def to_tfrecord(rows, filename):\n",
    "    input_encoders, input_decoders, labels = [], [], []\n",
    "    \n",
    "    for i in tqdm(range(len(rows))):\n",
    "        input_encoder, input_decoder, label = rows[0]\n",
    "        input_encoder = tokenizer.convert_tokens_to_ids(input_encoder)\n",
    "        input_decoder = tokenizer.convert_tokens_to_ids(input_decoder) + [eos_id]\n",
    "        label = tokenizer.convert_tokens_to_ids(label) + [eos_id]\n",
    "        input_encoder = input_encoder + [0] * (maxlen - len(input_encoder))\n",
    "        input_decoder = input_decoder + [0] * (maxlen - len(input_decoder))\n",
    "        label = label + [0] * (maxlen - len(label))\n",
    "        input_encoders.append(input_encoder)\n",
    "        input_decoders.append(input_decoder)\n",
    "        labels.append(label)\n",
    "    \n",
    "    r = tf.python_io.TFRecordWriter(f'{filename}.tfrecord')\n",
    "    for i in tqdm(range(len(labels))):\n",
    "        features = collections.OrderedDict()\n",
    "        features['input_encoder'] = create_int_feature(input_encoders[i])\n",
    "        features['input_decoder'] = create_int_feature(input_decoders[i])\n",
    "        features['y'] = create_int_feature(labels[i])\n",
    "        tf_example = tf.train.Example(\n",
    "            features = tf.train.Features(feature = features)\n",
    "        )\n",
    "        r.write(tf_example.SerializeToString())\n",
    "    r.close()\n",
    "    \n",
    "def process_NoisyLanguagePairDataset(row):\n",
    "    max_num_tokens = max_seq_length\n",
    "    target_seq_length = max_num_tokens\n",
    "    if rng.random() < short_seq_prob:\n",
    "        target_seq_length = rng.randint(2, max_num_tokens)\n",
    "    tokens_l = row[0][:max_num_tokens]\n",
    "    tokens_r = row[1][:max_num_tokens]\n",
    "    \n",
    "    cand_indexes_l = []\n",
    "    for (i, token) in enumerate(tokens_l):\n",
    "        if token == '[CLS]' or token == '[SEP]':\n",
    "            continue\n",
    "        if (\n",
    "            len(cand_indexes_l) >= 1\n",
    "            and token.startswith('##')\n",
    "        ):\n",
    "            cand_indexes_l[-1].append(i)\n",
    "        else:\n",
    "            cand_indexes_l.append([i])\n",
    "            \n",
    "    cand_indexes_r = []\n",
    "    for (i, token) in enumerate(tokens_r):\n",
    "        if token == '[CLS]' or token == '[SEP]':\n",
    "            continue\n",
    "        if (\n",
    "            len(cand_indexes_r) >= 1\n",
    "            and token.startswith('##')\n",
    "        ):\n",
    "            cand_indexes_r[-1].append(i)\n",
    "        else:\n",
    "            cand_indexes_r.append([i])\n",
    "            \n",
    "    rng.shuffle(cand_indexes_l)\n",
    "    rng.shuffle(cand_indexes_r)\n",
    "\n",
    "    num_to_predict = min(\n",
    "        max_predictions_per_seq,\n",
    "        max(1, int(round(len(tokens_l) * masked_lm_prob))),\n",
    "    )\n",
    "    \n",
    "    masked_lms = []\n",
    "    output_tokens_l = list(tokens_l)\n",
    "    covered_indexes = set()\n",
    "    for index_set in cand_indexes_l:\n",
    "        if len(masked_lms) >= num_to_predict:\n",
    "            break\n",
    "        is_any_index_covered = False\n",
    "        for index in index_set:\n",
    "            if index in covered_indexes:\n",
    "                is_any_index_covered = True\n",
    "                break\n",
    "        if is_any_index_covered:\n",
    "            continue\n",
    "        for index in index_set:\n",
    "            covered_indexes.add(index)\n",
    "\n",
    "            masked_token = None\n",
    "            # 80% of the time, replace with [MASK]\n",
    "            if rng.random() < 0.8:\n",
    "                masked_token = '[MASK]'\n",
    "            else:\n",
    "                # 10% of the time, keep original\n",
    "                if rng.random() < 0.5:\n",
    "                    masked_token = tokens_l[index]\n",
    "                # 10% of the time, replace with random word\n",
    "                else:\n",
    "                    masked_token = vocab_words[\n",
    "                        rng.randint(0, len(vocab_words) - 1)\n",
    "                    ]\n",
    "\n",
    "            output_tokens_l[index] = masked_token\n",
    "            masked_lms.append(tokens_l[index])\n",
    "    \n",
    "    num_to_predict = min(\n",
    "        max_predictions_per_seq,\n",
    "        max(1, int(round(len(tokens_r) * masked_lm_prob))),\n",
    "    )\n",
    "    \n",
    "    output_tokens_r = list(tokens_r)\n",
    "    label, input_decoder = [], []\n",
    "    covered_indexes = set()\n",
    "    for index_set in cand_indexes_r:\n",
    "        if len(label) >= num_to_predict:\n",
    "            break\n",
    "        is_any_index_covered = False\n",
    "        for index in index_set:\n",
    "            if index in covered_indexes:\n",
    "                is_any_index_covered = True\n",
    "                break\n",
    "        if is_any_index_covered:\n",
    "            continue\n",
    "        for index in index_set:\n",
    "            covered_indexes.add(index)\n",
    "\n",
    "            masked_token = None\n",
    "            # 80% of the time, replace with [MASK]\n",
    "            if rng.random() < 0.8:\n",
    "                masked_token = '[MASK]'\n",
    "            else:\n",
    "                # 10% of the time, keep original\n",
    "                if rng.random() < 0.5:\n",
    "                    masked_token = tokens_r[index]\n",
    "                # 10% of the time, replace with random word\n",
    "                else:\n",
    "                    masked_token = vocab_words[\n",
    "                        rng.randint(0, len(vocab_words) - 1)\n",
    "                    ]\n",
    "\n",
    "            output_tokens_r[index] = masked_token\n",
    "            label.append(tokens_r[index])\n",
    "            \n",
    "    return output_tokens_l, output_tokens_r, tokens_r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "dupe_factor = 15\n",
    "\n",
    "def get_inputs(left, right, filename):\n",
    "    all_documents = []\n",
    "    for i in tqdm(range(len(left))):\n",
    "        line_l = tokenization.convert_to_unicode(left[i])\n",
    "        line_r = tokenization.convert_to_unicode(right[i])\n",
    "\n",
    "        line_l = line_l.strip()\n",
    "        line_r = line_r.strip()\n",
    "        if line_l and line_r:\n",
    "            tokens_l = tokenizer.tokenize(line_l)\n",
    "            tokens_r = tokenizer.tokenize(line_r)\n",
    "            if len(tokens_l) < max_seq_length and len(tokens_r) < max_seq_length:\n",
    "                all_documents.append((tokens_l, tokens_r))\n",
    "                \n",
    "    results = []\n",
    "    \n",
    "    for row in tqdm(all_documents):\n",
    "        for _ in range(dupe_factor):\n",
    "            try:\n",
    "                results.append(process_NoisyLanguagePairDataset(row))\n",
    "            except:\n",
    "                pass\n",
    "            \n",
    "    to_tfrecord(results, filename)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def chunks_multiple(l, n, filename):\n",
    "    part = 0\n",
    "    for i in range(0, len(l), n):\n",
    "        x, y = list(zip(*l[i : i + n]))\n",
    "        yield (x, y, f'{filename}-part-{part}')\n",
    "        part += 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "pairs = ['en-ms.json', 'ms-en.json']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 41666/41666 [00:48<00:00, 855.31it/s] \n",
      "100%|██████████| 41666/41666 [00:49<00:00, 842.32it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 834.05it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 830.35it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 826.49it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 838.19it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 830.95it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 835.99it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 833.86it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 827.85it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 821.55it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 821.19it/s]\n",
      "100%|██████████| 41645/41645 [01:10<00:00, 591.55it/s]\n",
      "100%|██████████| 41609/41609 [01:11<00:00, 577.96it/s]t/s]\n",
      "100%|██████████| 41630/41630 [01:12<00:00, 574.71it/s]t/s]\n",
      " 98%|█████████▊| 40836/41630 [01:11<00:01, 640.10it/s]s]s]\n",
      "100%|██████████| 41612/41612 [01:12<00:00, 576.90it/s]s]]]\n",
      "100%|██████████| 41627/41627 [01:12<00:00, 576.76it/s]s]]]\n",
      "100%|██████████| 41627/41627 [01:12<00:00, 576.59it/s]t/s]\n",
      "100%|██████████| 41618/41618 [01:12<00:00, 573.57it/s]/s]]\n",
      "100%|██████████| 41630/41630 [01:13<00:00, 569.30it/s]/s]]\n",
      "100%|██████████| 41637/41637 [01:12<00:00, 573.21it/s]/s]\n",
      "100%|██████████| 41628/41628 [01:13<00:00, 566.87it/s]/s]\n",
      "100%|██████████| 41626/41626 [01:13<00:00, 569.19it/s]/s]\n",
      "100%|██████████| 624675/624675 [00:24<00:00, 25743.82it/s]\n",
      "100%|██████████| 624435/624435 [00:22<00:00, 28180.51it/s]\n",
      "100%|██████████| 624420/624420 [00:21<00:00, 29712.67it/s]\n",
      "100%|██████████| 624405/624405 [00:22<00:00, 28011.04it/s]\n",
      "  1%|          | 7266/624435 [00:01<02:23, 4302.55it/s]/s]\n",
      "100%|██████████| 624450/624450 [00:23<00:00, 27006.19it/s]\n",
      "100%|██████████| 624270/624270 [00:24<00:00, 25754.90it/s]\n",
      "100%|██████████| 624450/624450 [00:25<00:00, 24938.10it/s]\n",
      "100%|██████████| 624180/624180 [00:25<00:00, 24534.74it/s]\n",
      "100%|██████████| 624555/624555 [00:25<00:00, 24872.59it/s]\n",
      "100%|██████████| 624390/624390 [00:25<00:00, 24181.82it/s]\n",
      "100%|██████████| 624405/624405 [01:00<00:00, 10275.18it/s]\n",
      "100%|██████████| 624435/624435 [03:18<00:00, 3149.09it/s]\n",
      " 97%|█████████▋| 608826/624450 [03:16<00:04, 3542.28it/s]\n",
      "100%|██████████| 624405/624405 [03:19<00:00, 3134.65it/s]\n",
      "100%|██████████| 624420/624420 [03:19<00:00, 3124.45it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 885.06it/s]660.64it/s]\n",
      " 98%|█████████▊| 611821/624555 [03:16<00:03, 3878.08it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 50620.18it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4354.17it/s]3it/s]\n",
      "100%|██████████| 624450/624450 [03:19<00:00, 3134.17it/s]\n",
      "100%|██████████| 624135/624135 [03:20<00:00, 3118.97it/s]\n",
      "100%|██████████| 624270/624270 [03:20<00:00, 3120.14it/s]\n",
      "100%|██████████| 624450/624450 [03:20<00:00, 3111.03it/s]\n",
      "100%|██████████| 624180/624180 [03:20<00:00, 3117.37it/s]\n",
      "100%|██████████| 624555/624555 [03:19<00:00, 3129.90it/s]\n",
      "100%|██████████| 624390/624390 [03:19<00:00, 3137.35it/s]\n",
      "100%|██████████| 624405/624405 [03:27<00:00, 3008.67it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 843.91it/s] \n",
      "100%|██████████| 41666/41666 [00:49<00:00, 835.61it/s]\n",
      " 98%|█████████▊| 40773/41666 [00:50<00:01, 860.50it/s]\n",
      "  0%|          | 74/41623 [00:00<00:56, 738.47it/s]/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 836.96it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 832.33it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 824.59it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 823.20it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 825.25it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 826.20it/s]\n",
      "100%|██████████| 41666/41666 [00:51<00:00, 813.95it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 817.11it/s]\n",
      "100%|██████████| 41634/41634 [01:10<00:00, 593.51it/s]\n",
      "100%|██████████| 41623/41623 [01:10<00:00, 590.34it/s]]\n",
      "100%|██████████| 41621/41621 [01:11<00:00, 585.45it/s]/s]\n",
      "100%|██████████| 41626/41626 [01:10<00:00, 587.37it/s]/s]\n",
      "100%|██████████| 41628/41628 [01:11<00:00, 585.39it/s]s]\n",
      "100%|██████████| 41626/41626 [01:11<00:00, 582.09it/s]s]\n",
      "100%|██████████| 41622/41622 [01:11<00:00, 583.14it/s]s]]\n",
      "  1%|          | 3806/624330 [00:00<00:31, 19604.33it/s]]\n",
      "100%|██████████| 41629/41629 [01:11<00:00, 580.00it/s]s]]\n",
      "100%|██████████| 41628/41628 [01:11<00:00, 581.97it/s]/s]\n",
      "  3%|▎         | 17602/624315 [00:01<00:49, 12364.26it/s]\n",
      "100%|██████████| 41635/41635 [01:11<00:00, 584.01it/s]s]]\n",
      "100%|██████████| 624390/624390 [00:24<00:00, 25903.90it/s]\n",
      "  0%|          | 860/624390 [00:00<02:25, 4299.14it/s]t/s]\n",
      "100%|██████████| 624510/624510 [00:24<00:00, 25454.12it/s]\n",
      "  2%|▏         | 11378/624345 [00:02<02:25, 4222.42it/s]s]\n",
      "100%|██████████| 624495/624495 [00:25<00:00, 24238.36it/s]\n",
      "100%|██████████| 624435/624435 [00:30<00:00, 20772.70it/s]\n",
      "100%|██████████| 624420/624420 [00:29<00:00, 20829.54it/s]\n",
      "100%|██████████| 624525/624525 [00:29<00:00, 20855.10it/s]\n",
      "100%|██████████| 624390/624390 [00:42<00:00, 14784.80it/s]\n",
      "100%|██████████| 624330/624330 [00:43<00:00, 14391.91it/s]\n",
      "100%|██████████| 624315/624315 [01:00<00:00, 10314.41it/s]\n",
      "100%|██████████| 624510/624510 [01:20<00:00, 7802.22it/s]\n",
      "100%|██████████| 624390/624390 [03:03<00:00, 3406.25it/s]\n",
      "100%|██████████| 624345/624345 [03:03<00:00, 3398.82it/s]\n",
      "100%|██████████| 624510/624510 [03:03<00:00, 3408.41it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 537.46it/s]300.00it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 438.33it/s]\n",
      " 97%|█████████▋| 603283/624435 [02:58<00:05, 3637.55it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4319.65it/s]8it/s]\n",
      "100%|██████████| 624420/624420 [03:03<00:00, 3406.02it/s]\n",
      "100%|██████████| 624495/624495 [03:03<00:00, 3403.80it/s]\n",
      "100%|██████████| 624420/624420 [03:03<00:00, 3399.73it/s]\n",
      "100%|██████████| 624435/624435 [03:04<00:00, 3387.18it/s]\n",
      "100%|██████████| 624525/624525 [03:04<00:00, 3382.94it/s]\n",
      "100%|██████████| 624390/624390 [03:05<00:00, 3373.39it/s]\n",
      "100%|██████████| 624330/624330 [03:04<00:00, 3375.76it/s]\n",
      "100%|██████████| 624315/624315 [03:04<00:00, 3383.17it/s]\n",
      "100%|██████████| 624510/624510 [03:01<00:00, 3443.54it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 836.23it/s] \n",
      "100%|██████████| 41666/41666 [00:49<00:00, 838.30it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 832.36it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 834.25it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 840.10it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 831.42it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 829.80it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 830.70it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 823.14it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 823.68it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 820.54it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 817.63it/s]\n",
      " 96%|█████████▋| 40092/41620 [01:09<00:02, 718.76it/s]\n",
      " 98%|█████████▊| 40664/41617 [01:10<00:01, 637.43it/s]\n",
      "100%|██████████| 41621/41621 [01:10<00:00, 587.41it/s]s]\n",
      "100%|██████████| 41630/41630 [01:11<00:00, 585.76it/s]/s]\n",
      "100%|██████████| 41614/41614 [01:11<00:00, 581.12it/s]/s]\n",
      "100%|██████████| 41621/41621 [01:11<00:00, 583.13it/s]/s]\n",
      "100%|█████████▉| 41602/41623 [01:11<00:00, 630.10it/s]/s]\n",
      "100%|██████████| 41623/41623 [01:11<00:00, 582.81it/s]\n",
      "100%|██████████| 41625/41625 [01:11<00:00, 584.05it/s]/s]\n",
      "100%|██████████| 41623/41623 [01:11<00:00, 579.92it/s]\n",
      "100%|██████████| 41620/41620 [01:11<00:00, 583.87it/s]s]]\n",
      "100%|██████████| 41624/41624 [01:13<00:00, 565.69it/s]/s]]\n",
      "100%|██████████| 624450/624450 [00:23<00:00, 26772.61it/s]\n",
      " 79%|███████▉  | 495380/624360 [00:19<00:06, 18820.44it/s]\n",
      "100%|██████████| 624210/624210 [00:22<00:00, 27803.07it/s]\n",
      "100%|██████████| 624255/624255 [00:22<00:00, 27728.28it/s]\n",
      "100%|██████████| 624345/624345 [00:22<00:00, 27300.06it/s]\n",
      "100%|██████████| 624315/624315 [00:26<00:00, 23518.22it/s]\n",
      "100%|██████████| 624360/624360 [00:22<00:00, 27242.83it/s]\n",
      "100%|██████████| 624375/624375 [00:24<00:00, 25218.07it/s]\n",
      "100%|██████████| 624465/624465 [00:28<00:00, 21988.19it/s]\n",
      "100%|██████████| 624345/624345 [00:26<00:00, 23491.08it/s]\n",
      "  3%|▎         | 18194/624345 [00:04<02:57, 3414.61it/s]s]\n",
      "100%|██████████| 624300/624300 [00:28<00:00, 22267.67it/s]\n",
      "100%|██████████| 624210/624210 [03:09<00:00, 3300.35it/s]\n",
      "100%|██████████| 624315/624315 [03:10<00:00, 3277.98it/s]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 8/8 [00:00<00:00, 1799.55it/s]53.41it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1289.51it/s]01.16it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 26834.96it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 3043.38it/s]3it/s]\n",
      "100%|██████████| 624450/624450 [03:12<00:00, 3245.12it/s]\n",
      "100%|██████████| 624255/624255 [03:13<00:00, 3230.35it/s]\n",
      "100%|██████████| 624345/624345 [03:13<00:00, 3219.56it/s]\n",
      "100%|██████████| 624360/624360 [03:12<00:00, 3246.31it/s]\n",
      "100%|██████████| 624315/624315 [03:13<00:00, 3233.45it/s]\n",
      "100%|██████████| 624375/624375 [03:14<00:00, 3215.74it/s]\n",
      "100%|██████████| 624465/624465 [03:13<00:00, 3232.86it/s]\n",
      "100%|██████████| 624345/624345 [03:13<00:00, 3221.42it/s]\n",
      "100%|██████████| 624450/624450 [03:14<00:00, 3215.03it/s]\n",
      "100%|██████████| 624300/624300 [03:13<00:00, 3231.92it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 843.25it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 838.67it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 843.79it/s]\n",
      " 99%|█████████▊| 41059/41666 [00:49<00:00, 809.47it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 830.37it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 835.67it/s]\n",
      " 99%|█████████▉| 41352/41666 [00:50<00:00, 844.40it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 824.48it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 830.05it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 832.29it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 825.57it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 821.69it/s]\n",
      "100%|██████████| 41628/41628 [01:10<00:00, 592.81it/s]\n",
      "100%|██████████| 41627/41627 [01:11<00:00, 585.63it/s]/s]\n",
      "100%|██████████| 41625/41625 [01:11<00:00, 582.22it/s]\n",
      "100%|██████████| 41616/41616 [01:11<00:00, 585.87it/s]s]]\n",
      "100%|██████████| 41615/41615 [01:11<00:00, 579.60it/s]s]]\n",
      "100%|██████████| 41621/41621 [01:11<00:00, 581.61it/s]/s]\n",
      "100%|██████████| 41616/41616 [01:12<00:00, 576.18it/s]/s]\n",
      "100%|██████████| 41623/41623 [01:11<00:00, 581.44it/s]/s]\n",
      "  2%|▏         | 12188/624315 [00:00<00:15, 40549.13it/s]\n",
      "100%|██████████| 41629/41629 [01:11<00:00, 578.95it/s]\n",
      "100%|██████████| 41619/41619 [01:12<00:00, 576.43it/s]/s]\n",
      "100%|██████████| 41623/41623 [01:11<00:00, 578.75it/s]s]]\n",
      "100%|██████████| 624405/624405 [00:21<00:00, 29697.62it/s]\n",
      " 82%|████████▏ | 510042/624240 [00:20<00:03, 31776.51it/s]\n",
      "100%|██████████| 624375/624375 [00:21<00:00, 28387.97it/s]\n",
      "100%|██████████| 624315/624315 [00:21<00:00, 29164.92it/s]\n",
      "100%|██████████| 624435/624435 [00:22<00:00, 28072.90it/s]\n",
      " 97%|█████████▋| 605808/624240 [00:23<00:00, 31108.74it/s]\n",
      "100%|██████████| 624285/624285 [00:24<00:00, 25230.90it/s]\n",
      "100%|██████████| 624240/624240 [00:26<00:00, 23389.55it/s]\n",
      "100%|██████████| 624345/624345 [00:25<00:00, 24301.84it/s]\n",
      "100%|██████████| 624345/624345 [00:27<00:00, 22658.27it/s]\n",
      "100%|██████████| 624240/624240 [00:29<00:00, 21280.87it/s]\n",
      "100%|██████████| 624420/624420 [00:56<00:00, 11052.90it/s]\n",
      "100%|██████████| 624405/624405 [03:01<00:00, 3435.72it/s]\n",
      "100%|██████████| 624315/624315 [03:00<00:00, 3453.96it/s]\n",
      "100%|██████████| 624375/624375 [03:02<00:00, 3430.27it/s]\n",
      "100%|██████████| 624345/624345 [03:02<00:00, 3419.46it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 459.67it/s]980.72it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 381.14it/s]102.21it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 11609.19it/s]it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 710.13it/s]76it/s]\n",
      "100%|██████████| 624435/624435 [03:01<00:00, 3434.02it/s]\n",
      "100%|██████████| 624225/624225 [03:02<00:00, 3427.13it/s]\n",
      " 83%|████████▎ | 515566/624420 [02:32<00:33, 3211.48it/s]\n",
      "100%|██████████| 624345/624345 [03:02<00:00, 3428.39it/s]\n",
      "100%|██████████| 624240/624240 [03:02<00:00, 3418.44it/s]\n",
      "100%|██████████| 624345/624345 [03:02<00:00, 3414.41it/s]\n",
      "100%|██████████| 624240/624240 [03:02<00:00, 3416.30it/s]\n",
      "100%|██████████| 624420/624420 [02:59<00:00, 3488.19it/s]\n",
      "100%|██████████| 41666/41666 [00:48<00:00, 853.61it/s] \n",
      "100%|██████████| 41666/41666 [00:49<00:00, 844.04it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 845.08it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 847.64it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 838.70it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 841.49it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 841.11it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 837.03it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 838.82it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 840.76it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 838.38it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 834.10it/s]\n",
      "100%|██████████| 41628/41628 [01:10<00:00, 591.51it/s]\n",
      "100%|██████████| 41625/41625 [01:10<00:00, 592.08it/s]s]\n",
      "100%|██████████| 41607/41607 [01:10<00:00, 586.33it/s]/s]\n",
      "100%|██████████| 41622/41622 [01:11<00:00, 580.58it/s]/s]\n",
      "  5%|▌         | 32013/624420 [00:02<00:40, 14473.40it/s]\n",
      "100%|██████████| 41630/41630 [01:12<00:00, 576.03it/s]/s]\n",
      "100%|██████████| 41634/41634 [01:12<00:00, 577.62it/s]/s]\n",
      "100%|██████████| 41631/41631 [01:12<00:00, 577.87it/s]/s]\n",
      "  1%|          | 3722/624465 [00:00<00:16, 37182.09it/s]]\n",
      "100%|██████████| 41637/41637 [01:12<00:00, 571.36it/s]/s]\n",
      "100%|██████████| 41627/41627 [01:12<00:00, 576.86it/s]/s]\n",
      "100%|██████████| 41632/41632 [01:12<00:00, 572.94it/s]s]]\n",
      "100%|██████████| 624330/624330 [00:20<00:00, 30369.53it/s]\n",
      "100%|██████████| 624375/624375 [00:27<00:00, 23041.53it/s]\n",
      "100%|██████████| 624510/624510 [00:25<00:00, 24922.98it/s]\n",
      "100%|██████████| 624555/624555 [00:24<00:00, 25065.02it/s]\n",
      "100%|██████████| 624405/624405 [00:25<00:00, 24267.03it/s]\n",
      "100%|██████████| 624405/624405 [00:26<00:00, 23965.13it/s]\n",
      "100%|██████████| 624450/624450 [00:26<00:00, 23170.91it/s]\n",
      "100%|██████████| 624105/624105 [00:28<00:00, 21664.39it/s]\n",
      "100%|██████████| 624465/624465 [00:27<00:00, 23063.70it/s]\n",
      "100%|██████████| 624480/624480 [00:26<00:00, 23359.05it/s]\n",
      "100%|██████████| 624510/624510 [00:27<00:00, 22562.99it/s]\n",
      "100%|██████████| 624420/624420 [00:51<00:00, 12122.13it/s]\n",
      "100%|██████████| 624330/624330 [03:00<00:00, 3466.73it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 847.70it/s]036.66it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 666.53it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 10948.56it/s]it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4288.84it/s]4it/s]\n",
      "100%|██████████| 624405/624405 [03:01<00:00, 3441.58it/s]\n",
      "100%|██████████| 624375/624375 [03:02<00:00, 3426.48it/s]\n",
      "100%|██████████| 624510/624510 [03:02<00:00, 3422.31it/s]\n",
      "100%|██████████| 624105/624105 [03:01<00:00, 3439.29it/s]\n",
      "100%|██████████| 624405/624405 [03:01<00:00, 3430.86it/s]\n",
      "100%|██████████| 624555/624555 [03:03<00:00, 3403.30it/s]\n",
      "100%|██████████| 624465/624465 [03:02<00:00, 3415.79it/s]\n",
      "100%|██████████| 624450/624450 [03:03<00:00, 3405.57it/s]\n",
      "100%|██████████| 624480/624480 [03:02<00:00, 3415.01it/s]\n",
      "100%|██████████| 624510/624510 [03:02<00:00, 3414.80it/s]\n",
      "100%|██████████| 624420/624420 [03:00<00:00, 3457.50it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 839.46it/s] \n",
      "100%|██████████| 41666/41666 [00:49<00:00, 837.26it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 833.25it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 830.83it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 830.19it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 832.56it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 824.62it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 832.74it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 828.27it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 824.70it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 819.70it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 823.48it/s]\n",
      "100%|██████████| 41629/41629 [01:10<00:00, 587.26it/s]\n",
      "100%|██████████| 41624/41624 [01:10<00:00, 589.06it/s]s]\n",
      "100%|██████████| 41621/41621 [01:11<00:00, 585.06it/s]/s]\n",
      "100%|██████████| 41639/41639 [01:11<00:00, 584.88it/s]s]]\n",
      "100%|██████████| 41633/41633 [01:11<00:00, 586.06it/s]\n",
      "100%|██████████| 41632/41632 [01:11<00:00, 582.77it/s]/s]\n",
      "100%|██████████| 41633/41633 [01:12<00:00, 577.70it/s]s]]\n",
      "100%|██████████| 41620/41620 [01:12<00:00, 577.18it/s]/s]\n",
      "  2%|▏         | 12886/624315 [00:01<01:02, 9716.40it/s]]\n",
      "100%|██████████| 41625/41625 [01:11<00:00, 581.76it/s]s]]\n",
      "  3%|▎         | 21473/624480 [00:00<00:17, 35414.93it/s]\n",
      "  2%|▏         | 9846/624375 [00:00<00:18, 32921.42it/s]]\n",
      " 30%|██▉       | 186242/624315 [00:22<00:46, 9517.59it/s]]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|█████████▉| 622738/624495 [00:21<00:00, 42804.92it/s]\n",
      "100%|██████████| 624495/624495 [00:21<00:00, 29175.10it/s]\n",
      "100%|██████████| 624300/624300 [00:21<00:00, 28691.09it/s]\n",
      "100%|██████████| 624420/624420 [00:22<00:00, 27918.82it/s]\n",
      "100%|██████████| 624330/624330 [00:22<00:00, 27242.48it/s]\n",
      "100%|██████████| 624585/624585 [00:25<00:00, 24641.11it/s]\n",
      "100%|██████████| 624480/624480 [00:24<00:00, 25201.68it/s]\n",
      "100%|██████████| 624495/624495 [00:26<00:00, 23452.06it/s]\n",
      "100%|██████████| 624375/624375 [00:25<00:00, 24177.25it/s]\n",
      "100%|██████████| 624360/624360 [00:26<00:00, 23386.71it/s]\n",
      "100%|██████████| 624315/624315 [01:11<00:00, 8763.11it/s] \n",
      "100%|██████████| 624300/624300 [03:00<00:00, 3467.32it/s]\n",
      "100%|██████████| 624495/624495 [03:01<00:00, 3440.54it/s]\n",
      "100%|██████████| 624360/624360 [03:01<00:00, 3430.97it/s]\n",
      "100%|██████████| 624435/624435 [03:02<00:00, 3418.03it/s]\n",
      "100%|██████████| 624420/624420 [03:01<00:00, 3436.52it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 387.52it/s]790.14it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 296.25it/s]027.56it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 35071.88it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 2058.25it/s]4it/s]\n",
      "100%|██████████| 624330/624330 [03:02<00:00, 3420.14it/s]\n",
      "100%|██████████| 624480/624480 [03:04<00:00, 3378.60it/s]\n",
      "100%|██████████| 624495/624495 [03:03<00:00, 3399.06it/s]\n",
      "100%|██████████| 624585/624585 [03:05<00:00, 3369.90it/s]\n",
      "100%|██████████| 624375/624375 [03:05<00:00, 3364.28it/s]\n",
      "100%|██████████| 624360/624360 [03:06<00:00, 3350.57it/s]\n",
      "100%|██████████| 624315/624315 [03:12<00:00, 3236.19it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 844.99it/s] \n",
      "100%|██████████| 41666/41666 [00:49<00:00, 843.79it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 839.71it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 841.07it/s]\n",
      " 99%|█████████▉| 41448/41666 [00:49<00:00, 870.26it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 833.83it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 834.44it/s]\n",
      "100%|█████████▉| 41518/41666 [00:50<00:00, 864.33it/s]\n",
      "100%|██████████| 41666/41666 [00:50<00:00, 828.20it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 833.84it/s]\n",
      "100%|██████████| 41666/41666 [00:49<00:00, 834.20it/s]\n",
      "  1%|          | 308/41628 [00:00<02:52, 238.96it/s]s]\n",
      "100%|██████████| 41617/41617 [01:10<00:00, 588.13it/s]\n",
      "100%|██████████| 41622/41622 [01:10<00:00, 589.43it/s]s]\n",
      "100%|██████████| 41625/41625 [01:11<00:00, 584.49it/s]\n",
      "100%|██████████| 41617/41617 [01:10<00:00, 586.86it/s]s]\n",
      "100%|██████████| 41629/41629 [01:11<00:00, 585.19it/s]s]]\n",
      "100%|██████████| 41626/41626 [01:10<00:00, 590.78it/s]/s]\n",
      "100%|██████████| 41628/41628 [01:10<00:00, 586.79it/s]s]\n",
      "100%|██████████| 41628/41628 [01:11<00:00, 579.91it/s]s]]\n",
      "100%|██████████| 41627/41627 [01:10<00:00, 586.42it/s]s]\n",
      "100%|██████████| 41626/41626 [01:11<00:00, 580.49it/s]/s]\n",
      "100%|██████████| 41629/41629 [01:12<00:00, 576.56it/s]/s]\n",
      "100%|██████████| 41621/41621 [01:11<00:00, 579.46it/s]/s]\n",
      "100%|██████████| 624420/624420 [00:24<00:00, 25992.40it/s]\n",
      "100%|██████████| 624375/624375 [00:25<00:00, 24929.00it/s]\n",
      "100%|██████████| 624390/624390 [00:25<00:00, 24948.38it/s]\n",
      "100%|██████████| 624435/624435 [00:27<00:00, 22564.75it/s]\n",
      "100%|██████████| 624315/624315 [00:26<00:00, 23733.38it/s]\n",
      "100%|██████████| 624330/624330 [00:29<00:00, 21431.62it/s]\n",
      "100%|██████████| 624390/624390 [00:29<00:00, 21203.58it/s]\n",
      "100%|██████████| 624420/624420 [00:28<00:00, 21665.71it/s]\n",
      "100%|██████████| 624405/624405 [00:28<00:00, 21707.19it/s]\n",
      "100%|██████████| 624255/624255 [00:30<00:00, 20453.74it/s]\n",
      "100%|██████████| 624435/624435 [00:31<00:00, 20089.93it/s]\n",
      "100%|██████████| 624255/624255 [00:37<00:00, 16467.11it/s]\n",
      "100%|██████████| 624420/624420 [02:59<00:00, 3479.08it/s]\n",
      "100%|██████████| 624375/624375 [02:59<00:00, 3478.14it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 587.23it/s]674.29it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 487.72it/s]646.28it/s]\n",
      " 99%|█████████▉| 617814/624315 [02:58<00:01, 3608.17it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4133.44it/s]6it/s]\n",
      "100%|██████████| 624390/624390 [03:00<00:00, 3465.34it/s]\n",
      "100%|██████████| 624315/624315 [03:00<00:00, 3468.30it/s]\n",
      "100%|██████████| 624435/624435 [03:00<00:00, 3450.75it/s]\n",
      "100%|██████████| 624330/624330 [03:00<00:00, 3468.12it/s]\n",
      "100%|██████████| 624405/624405 [03:00<00:00, 3463.63it/s]\n",
      "100%|██████████| 624390/624390 [03:01<00:00, 3446.32it/s]\n",
      "100%|██████████| 624420/624420 [03:01<00:00, 3443.33it/s]\n",
      "100%|██████████| 624255/624255 [03:00<00:00, 3457.34it/s]\n",
      "100%|██████████| 624435/624435 [03:00<00:00, 3464.85it/s]\n",
      "100%|██████████| 624255/624255 [03:00<00:00, 3457.73it/s]\n",
      "100%|██████████| 32110/32110 [00:37<00:00, 848.37it/s] \n",
      "100%|██████████| 32110/32110 [00:38<00:00, 840.42it/s]\n",
      "100%|██████████| 32110/32110 [00:38<00:00, 839.09it/s]\n",
      " 99%|█████████▉| 31854/32110 [00:38<00:00, 787.85it/s]\n",
      "100%|██████████| 32110/32110 [00:38<00:00, 833.02it/s]\n",
      " 98%|█████████▊| 31593/32110 [00:38<00:00, 794.23it/s]\n",
      "100%|█████████▉| 32029/32110 [00:38<00:00, 815.81it/s]\n",
      "100%|██████████| 32110/32110 [00:38<00:00, 827.68it/s]\n",
      "100%|██████████| 32110/32110 [00:38<00:00, 836.24it/s]\n",
      "100%|██████████| 32110/32110 [00:38<00:00, 830.78it/s]\n",
      "100%|██████████| 32110/32110 [00:38<00:00, 833.60it/s]\n",
      "100%|██████████| 32110/32110 [00:38<00:00, 827.85it/s]\n",
      " 96%|█████████▌| 30731/32078 [00:53<00:02, 653.10it/s]\n",
      "100%|██████████| 32075/32075 [00:54<00:00, 584.72it/s]/s]\n",
      "100%|██████████| 32069/32069 [00:55<00:00, 573.73it/s]/s]\n",
      "100%|██████████| 32076/32076 [00:55<00:00, 574.68it/s]s]]\n",
      "100%|██████████| 32078/32078 [00:55<00:00, 573.82it/s]/s]\n",
      "100%|██████████| 32083/32083 [00:56<00:00, 569.22it/s]s]]\n",
      "100%|██████████| 32074/32074 [00:55<00:00, 573.10it/s]s]]\n",
      "100%|██████████| 32076/32076 [00:56<00:00, 571.85it/s]/s]\n",
      "100%|██████████| 32075/32075 [00:56<00:00, 567.87it/s]s]]\n",
      "100%|██████████| 32078/32078 [00:55<00:00, 573.32it/s]\n",
      "100%|██████████| 32073/32073 [00:56<00:00, 572.48it/s]/s]\n",
      "100%|██████████| 32080/32080 [00:55<00:00, 573.50it/s]/s]\n",
      " 83%|████████▎ | 399968/481140 [00:16<00:02, 33498.17it/s]\n",
      "100%|██████████| 481185/481185 [00:18<00:00, 25888.42it/s]\n",
      " 86%|████████▋ | 415858/481095 [00:16<00:01, 36266.70it/s]\n",
      "100%|██████████| 481125/481125 [00:17<00:00, 27374.26it/s]\n",
      "100%|██████████| 481140/481140 [00:18<00:00, 26456.49it/s]\n",
      "100%|██████████| 481095/481095 [00:18<00:00, 26654.32it/s]\n",
      "100%|██████████| 481170/481170 [00:19<00:00, 24256.03it/s]\n",
      "100%|██████████| 481110/481110 [00:20<00:00, 23884.79it/s]\n",
      "100%|██████████| 481200/481200 [00:19<00:00, 24343.79it/s]\n",
      "100%|██████████| 481170/481170 [00:20<00:00, 23507.33it/s]\n",
      "100%|██████████| 481035/481035 [00:21<00:00, 22629.41it/s]\n",
      "100%|██████████| 481245/481245 [00:21<00:00, 22053.68it/s]\n",
      "100%|██████████| 481125/481125 [02:17<00:00, 3502.18it/s]\n",
      "100%|██████████| 481185/481185 [02:17<00:00, 3499.42it/s]\n",
      "100%|██████████| 481140/481140 [02:18<00:00, 3476.21it/s]\n",
      "100%|██████████| 3/3 [00:00<00:00, 1222.95it/s]12.74it/s]\n",
      "100%|██████████| 3/3 [00:00<00:00, 960.53it/s]\n",
      "100%|██████████| 45/45 [00:00<00:00, 40494.25it/s]\n",
      "100%|██████████| 45/45 [00:00<00:00, 3442.28it/s].51it/s]\n",
      "100%|██████████| 481095/481095 [02:17<00:00, 3491.31it/s]\n",
      "100%|██████████| 481140/481140 [02:17<00:00, 3487.17it/s]\n",
      "100%|██████████| 481125/481125 [02:18<00:00, 3472.97it/s]\n",
      "100%|██████████| 481170/481170 [02:18<00:00, 3471.38it/s]\n",
      "100%|██████████| 481200/481200 [02:18<00:00, 3473.65it/s]\n",
      "100%|██████████| 481110/481110 [02:19<00:00, 3454.77it/s]\n",
      "100%|██████████| 481035/481035 [02:18<00:00, 3468.97it/s]\n",
      "100%|██████████| 481170/481170 [02:18<00:00, 3465.52it/s]\n",
      "100%|██████████| 481245/481245 [02:18<00:00, 3465.14it/s]\n",
      "100%|██████████| 41666/41666 [00:08<00:00, 5194.25it/s]\n",
      "100%|██████████| 41666/41666 [00:09<00:00, 4562.93it/s]\n",
      "100%|██████████| 41666/41666 [00:09<00:00, 4520.10it/s]\n",
      "100%|██████████| 41666/41666 [00:16<00:00, 2454.04it/s]\n",
      "100%|██████████| 41666/41666 [00:18<00:00, 2210.85it/s]\n",
      "100%|██████████| 41630/41630 [00:17<00:00, 2384.95it/s]\n",
      "100%|██████████| 41666/41666 [00:27<00:00, 1502.71it/s]s]\n",
      "100%|██████████| 41620/41620 [00:19<00:00, 2176.44it/s]] \n",
      " 87%|████████▋ | 36416/41666 [00:28<00:03, 1386.32it/s]s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1406.55it/s]/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1371.55it/s]/s]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 41666/41666 [00:30<00:00, 1376.87it/s]/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1365.54it/s]/s]\n",
      "100%|██████████| 41666/41666 [00:32<00:00, 1294.36it/s]/s]\n",
      "100%|██████████| 41666/41666 [00:33<00:00, 1260.37it/s]/s]\n",
      "100%|██████████| 624450/624450 [00:19<00:00, 31943.58it/s]\n",
      "100%|██████████| 624300/624300 [00:17<00:00, 35943.21it/s]\n",
      "100%|██████████| 41560/41560 [00:30<00:00, 1376.46it/s]/s]\n",
      " 39%|███▊      | 16043/41665 [00:18<00:23, 1109.23it/s]/s]\n",
      "100%|██████████| 41609/41609 [00:33<00:00, 1238.93it/s]]s]\n",
      "100%|██████████| 624135/624135 [00:18<00:00, 33381.63it/s]\n",
      "100%|██████████| 41666/41666 [00:43<00:00, 957.21it/s] /s]\n",
      "100%|██████████| 623400/623400 [00:24<00:00, 25302.53it/s]\n",
      "100%|██████████| 41665/41665 [00:44<00:00, 939.04it/s] s]\n",
      "100%|██████████| 41666/41666 [00:45<00:00, 914.62it/s]s]]]\n",
      " 24%|██▎       | 147364/624990 [00:05<00:12, 39290.81it/s]\n",
      "100%|██████████| 41666/41666 [00:48<00:00, 862.44it/s]/s]]\n",
      "100%|██████████| 41665/41665 [00:49<00:00, 836.16it/s]/s]]\n",
      "100%|██████████| 41665/41665 [00:52<00:00, 797.57it/s]/s]]\n",
      "100%|██████████| 624990/624990 [00:20<00:00, 30677.94it/s]\n",
      " 68%|██████▊   | 423707/624975 [00:18<00:06, 29871.93it/s]\n",
      "100%|██████████| 624990/624990 [00:23<00:00, 26829.52it/s]\n",
      "100%|██████████| 624975/624975 [00:25<00:00, 24469.29it/s]\n",
      "100%|██████████| 624990/624990 [00:26<00:00, 23187.38it/s]\n",
      "100%|██████████| 624975/624975 [00:24<00:00, 25049.65it/s]\n",
      "100%|██████████| 624975/624975 [00:23<00:00, 26353.71it/s]\n",
      " 99%|█████████▉| 618758/624300 [02:48<00:01, 4046.91it/s]\n",
      "100%|██████████| 624300/624300 [02:50<00:00, 3669.78it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1700.08it/s]25.03it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1330.10it/s]64.13it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 47140.25it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4415.37it/s]6it/s]\n",
      "100%|██████████| 624150/624150 [02:50<00:00, 3669.55it/s]\n",
      "100%|██████████| 624135/624135 [02:52<00:00, 3617.32it/s]\n",
      "100%|██████████| 623400/623400 [02:54<00:00, 3574.08it/s]\n",
      "100%|██████████| 624990/624990 [02:55<00:00, 3560.14it/s]\n",
      "100%|██████████| 624975/624975 [02:53<00:00, 3607.16it/s]\n",
      "100%|██████████| 624990/624990 [02:54<00:00, 3587.73it/s]\n",
      "100%|██████████| 624990/624990 [02:53<00:00, 3605.81it/s]\n",
      "100%|██████████| 624975/624975 [02:56<00:00, 3539.06it/s]\n",
      "100%|██████████| 624975/624975 [02:53<00:00, 3603.54it/s]\n",
      "100%|██████████| 624975/624975 [02:53<00:00, 3597.75it/s]\n",
      " 95%|█████████▌| 39594/41666 [00:29<00:01, 1335.55it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1427.89it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1392.67it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1378.37it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1375.89it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1357.58it/s]\n",
      "\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1356.33it/s]\n",
      "100%|██████████| 41666/41666 [00:31<00:00, 1339.53it/s]\n",
      "100%|██████████| 41666/41666 [00:31<00:00, 1341.66it/s]\n",
      "100%|██████████| 41666/41666 [00:31<00:00, 1337.59it/s]\n",
      "100%|██████████| 41666/41666 [00:32<00:00, 1287.60it/s]\n",
      "100%|██████████| 41665/41665 [00:44<00:00, 929.31it/s] \n",
      "100%|██████████| 41666/41666 [00:45<00:00, 923.89it/s] s]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 931.73it/s] ]]\n",
      "100%|██████████| 41664/41664 [00:45<00:00, 921.14it/s] s]\n",
      "100%|██████████| 41666/41666 [00:45<00:00, 921.13it/s]/s]\n",
      "100%|██████████| 41666/41666 [00:45<00:00, 923.29it/s] s]\n",
      " 12%|█▏        | 72930/624990 [00:02<00:18, 29569.86it/s]\n",
      "100%|██████████| 41666/41666 [00:46<00:00, 892.74it/s] s]]\n",
      "100%|██████████| 41664/41664 [00:46<00:00, 896.08it/s]t/s]\n",
      "100%|██████████| 41666/41666 [00:47<00:00, 878.65it/s] s]]\n",
      "100%|██████████| 41665/41665 [00:46<00:00, 888.51it/s]/s]]\n",
      " 16%|█▌        | 98228/624990 [00:03<00:16, 32328.98it/s]]\n",
      "100%|██████████| 624990/624990 [00:21<00:00, 29048.33it/s]\n",
      "100%|██████████| 624975/624975 [00:24<00:00, 25778.64it/s]\n",
      "100%|██████████| 624990/624990 [00:24<00:00, 25658.09it/s]\n",
      "100%|██████████| 624960/624960 [00:25<00:00, 24129.86it/s]\n",
      "100%|██████████| 624975/624975 [00:23<00:00, 27041.63it/s]\n",
      "100%|██████████| 624990/624990 [00:25<00:00, 24220.22it/s]\n",
      "  0%|          | 0/624990 [00:00<?, ?it/s]0, 25800.04it/s]\n",
      "100%|██████████| 624990/624990 [00:27<00:00, 23011.76it/s]\n",
      "100%|██████████| 624990/624990 [00:25<00:00, 24849.22it/s]\n",
      "100%|██████████| 624960/624960 [00:25<00:00, 24460.13it/s]\n",
      "100%|██████████| 624990/624990 [00:24<00:00, 25868.51it/s]\n",
      "100%|██████████| 624990/624990 [00:26<00:00, 23623.74it/s]\n",
      "100%|██████████| 624990/624990 [03:20<00:00, 3122.32it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1315.09it/s]12.98it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 989.37it/s]461.18it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 38185.00it/s]it/s]\n",
      "100%|██████████| 624975/624975 [03:20<00:00, 3117.24it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4335.12it/s]\n",
      "100%|██████████| 624990/624990 [03:20<00:00, 3113.48it/s]\n",
      "100%|██████████| 624960/624960 [03:21<00:00, 3104.05it/s]\n",
      "100%|██████████| 624975/624975 [03:21<00:00, 3106.24it/s]\n",
      "100%|██████████| 624990/624990 [03:21<00:00, 3098.85it/s]\n",
      "100%|██████████| 624960/624960 [03:20<00:00, 3117.37it/s]\n",
      "100%|██████████| 624990/624990 [03:22<00:00, 3087.13it/s]\n",
      "100%|██████████| 624990/624990 [03:21<00:00, 3096.24it/s]\n",
      "100%|██████████| 624990/624990 [03:22<00:00, 3086.21it/s]\n",
      "100%|██████████| 624990/624990 [03:21<00:00, 3101.48it/s]\n",
      "100%|██████████| 624990/624990 [03:22<00:00, 3092.18it/s]\n",
      "100%|██████████| 41666/41666 [00:25<00:00, 1641.07it/s]\n",
      "100%|██████████| 41666/41666 [00:27<00:00, 1530.98it/s]\n",
      "100%|██████████| 41666/41666 [00:27<00:00, 1528.84it/s]\n",
      "100%|██████████| 41666/41666 [00:27<00:00, 1523.98it/s]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1471.76it/s]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1471.48it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1422.23it/s]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1438.90it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1434.75it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1406.40it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1383.67it/s]\n",
      "100%|██████████| 41666/41666 [00:31<00:00, 1342.81it/s]\n",
      " 84%|████████▍ | 35031/41666 [00:37<00:05, 1106.96it/s]\n",
      "100%|██████████| 41666/41666 [00:42<00:00, 973.00it/s] /s]\n",
      " 86%|████████▌ | 35684/41666 [00:39<00:05, 1022.02it/s]s]\n",
      "100%|██████████| 41666/41666 [00:43<00:00, 965.30it/s] s]\n",
      "100%|██████████| 41665/41665 [00:44<00:00, 945.19it/s] s]]\n",
      "100%|██████████| 41660/41660 [00:44<00:00, 938.82it/s] s]]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 942.32it/s] s]]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 936.51it/s] ]]]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 928.43it/s]/s]]\n",
      "100%|██████████| 41666/41666 [00:46<00:00, 900.02it/s] s]]\n",
      "100%|██████████| 41665/41665 [00:45<00:00, 910.19it/s] \n",
      "100%|██████████| 41666/41666 [00:46<00:00, 904.31it/s] s]]\n",
      "100%|██████████| 624975/624975 [00:20<00:00, 30313.14it/s]\n",
      "100%|██████████| 624990/624990 [00:22<00:00, 27876.32it/s]\n",
      "100%|██████████| 624990/624990 [00:23<00:00, 26635.47it/s]\n",
      " 74%|███████▍  | 463272/624975 [00:21<00:05, 28391.09it/s]\n",
      "  5%|▍         | 28606/624975 [00:06<02:23, 4151.46it/s]s]\n",
      "100%|██████████| 624900/624900 [00:21<00:00, 28964.98it/s]\n",
      "100%|██████████| 624990/624990 [00:20<00:00, 29764.57it/s]\n",
      "100%|██████████| 624990/624990 [00:21<00:00, 29060.15it/s]\n",
      "100%|██████████| 624975/624975 [00:22<00:00, 27910.17it/s]\n",
      "100%|██████████| 624975/624975 [00:26<00:00, 23441.10it/s]\n",
      "100%|██████████| 624990/624990 [00:23<00:00, 26466.56it/s]\n",
      "100%|██████████| 624990/624990 [00:25<00:00, 24655.98it/s]\n",
      "100%|██████████| 624975/624975 [02:54<00:00, 3581.75it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 736.42it/s]102.11it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 423.18it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 31763.00it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 3457.89it/s]6it/s]\n",
      "100%|██████████| 624900/624900 [02:54<00:00, 3579.88it/s]\n",
      "100%|██████████| 624990/624990 [02:55<00:00, 3565.41it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3541.00it/s]\n",
      "100%|██████████| 624990/624990 [02:55<00:00, 3554.13it/s]\n",
      "100%|██████████| 624990/624990 [02:55<00:00, 3554.77it/s]\n",
      "100%|██████████| 624990/624990 [02:55<00:00, 3560.84it/s]\n",
      "100%|██████████| 624990/624990 [02:55<00:00, 3553.38it/s]\n",
      "100%|██████████| 624975/624975 [02:56<00:00, 3545.78it/s]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 624975/624975 [02:55<00:00, 3557.60it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3547.95it/s]\n",
      "100%|██████████| 624990/624990 [02:55<00:00, 3559.18it/s]\n",
      "100%|██████████| 41666/41666 [00:24<00:00, 1717.42it/s]\n",
      "100%|██████████| 41666/41666 [00:25<00:00, 1620.58it/s]\n",
      "100%|██████████| 41666/41666 [00:26<00:00, 1577.43it/s]\n",
      "100%|██████████| 41666/41666 [00:26<00:00, 1562.46it/s]\n",
      "100%|██████████| 41666/41666 [00:27<00:00, 1491.37it/s]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1472.63it/s]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1438.59it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1371.32it/s]\n",
      "100%|██████████| 41666/41666 [00:31<00:00, 1310.93it/s]\n",
      "100%|██████████| 41666/41666 [00:32<00:00, 1300.29it/s]\n",
      "100%|██████████| 41666/41666 [00:32<00:00, 1296.65it/s]\n",
      "100%|██████████| 41666/41666 [00:32<00:00, 1292.23it/s]\n",
      "100%|██████████| 41665/41665 [00:39<00:00, 1053.72it/s]\n",
      "100%|██████████| 41663/41663 [00:41<00:00, 1015.20it/s]s]\n",
      "100%|██████████| 41664/41664 [00:42<00:00, 985.01it/s] ]s]\n",
      " 82%|████████▏ | 34287/41665 [00:38<00:07, 933.86it/s] s]]\n",
      "100%|██████████| 41666/41666 [00:43<00:00, 960.64it/s] ] ]\n",
      "100%|██████████| 41665/41665 [00:44<00:00, 940.71it/s] /s]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 930.13it/s] /s]\n",
      "100%|██████████| 41665/41665 [00:45<00:00, 907.44it/s] /s]\n",
      "100%|██████████| 41666/41666 [00:47<00:00, 886.43it/s]t/s]\n",
      "100%|██████████| 41665/41665 [00:47<00:00, 873.69it/s] /s]\n",
      "100%|██████████| 41666/41666 [00:47<00:00, 873.57it/s]]s]]\n",
      "100%|██████████| 41666/41666 [00:47<00:00, 874.85it/s] /s]\n",
      "100%|██████████| 624975/624975 [00:25<00:00, 24775.02it/s]\n",
      "100%|██████████| 624960/624960 [00:23<00:00, 26915.60it/s]\n",
      "100%|██████████| 624945/624945 [00:27<00:00, 22917.75it/s]\n",
      "100%|██████████| 624960/624960 [00:27<00:00, 22521.59it/s]\n",
      "100%|██████████| 624990/624990 [00:25<00:00, 24111.63it/s]\n",
      "100%|██████████| 624990/624990 [00:23<00:00, 26128.18it/s]\n",
      "100%|██████████| 624975/624975 [00:28<00:00, 21633.00it/s]\n",
      "100%|██████████| 624975/624975 [00:25<00:00, 24710.46it/s]\n",
      "100%|██████████| 624990/624990 [00:24<00:00, 25424.59it/s]\n",
      " 11%|█▏        | 71259/624975 [00:17<02:36, 3530.72it/s]s]\n",
      "100%|██████████| 624990/624990 [00:29<00:00, 21350.68it/s]\n",
      "100%|██████████| 624990/624990 [00:29<00:00, 21012.00it/s]\n",
      "100%|██████████| 624975/624975 [02:54<00:00, 3571.53it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1716.34it/s]24.10it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1305.87it/s]78.06it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 51622.20it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4446.85it/s]5it/s]\n",
      " 92%|█████████▏| 575493/624975 [02:45<00:13, 3550.41it/s]\n",
      "100%|██████████| 624945/624945 [02:56<00:00, 3541.33it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3549.10it/s]\n",
      "100%|██████████| 624960/624960 [02:57<00:00, 3524.72it/s]\n",
      "100%|██████████| 624990/624990 [02:57<00:00, 3525.37it/s]\n",
      "100%|██████████| 624975/624975 [02:57<00:00, 3517.51it/s]\n",
      " 99%|█████████▉| 620703/624990 [02:55<00:00, 4287.63it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3534.98it/s]\n",
      "100%|██████████| 624975/624975 [02:57<00:00, 3524.33it/s]\n",
      "100%|██████████| 624990/624990 [02:57<00:00, 3530.63it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3535.74it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1431.28it/s]\n",
      "100%|█████████▉| 41589/41666 [00:29<00:00, 1381.51it/s]\n",
      " 98%|█████████▊| 41035/41666 [00:29<00:00, 1613.99it/s]\n",
      "  2%|▏         | 665/41665 [00:00<00:42, 957.82it/s]/s]\n",
      "  0%|          | 114/41665 [00:00<00:36, 1135.22it/s]s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1383.33it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1364.53it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1350.39it/s]\n",
      "100%|██████████| 41666/41666 [00:31<00:00, 1336.33it/s]\n",
      "  0%|          | 105/41665 [00:00<00:39, 1048.96it/s]s]\n",
      "100%|██████████| 41666/41666 [00:31<00:00, 1331.24it/s]\n",
      "100%|██████████| 41666/41666 [00:32<00:00, 1284.58it/s]\n",
      "100%|██████████| 41663/41663 [00:43<00:00, 950.10it/s] \n",
      "100%|██████████| 41665/41665 [00:44<00:00, 931.11it/s] s]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 933.27it/s] s]\n",
      "100%|██████████| 41665/41665 [00:44<00:00, 928.93it/s] ]]\n",
      "100%|██████████| 41666/41666 [00:45<00:00, 922.36it/s]/s]\n",
      "100%|██████████| 41666/41666 [00:45<00:00, 906.48it/s] s]\n",
      "100%|██████████| 41666/41666 [00:45<00:00, 915.20it/s] s]\n",
      "100%|██████████| 41665/41665 [00:45<00:00, 911.97it/s] s]]\n",
      "100%|██████████| 41665/41665 [00:46<00:00, 904.88it/s] s]\n",
      "100%|██████████| 41666/41666 [00:45<00:00, 907.74it/s] s]]\n",
      "100%|██████████| 41666/41666 [00:46<00:00, 897.48it/s]/s]]\n",
      "100%|██████████| 41666/41666 [00:47<00:00, 881.65it/s]t/s]\n",
      "100%|██████████| 624945/624945 [00:23<00:00, 26475.52it/s]\n",
      "100%|██████████| 624975/624975 [00:22<00:00, 27338.76it/s]\n",
      "100%|██████████| 624975/624975 [00:21<00:00, 29312.12it/s]\n",
      " 84%|████████▍ | 525679/624990 [00:22<00:03, 32456.15it/s]\n",
      "100%|██████████| 624990/624990 [00:22<00:00, 28231.21it/s]\n",
      "100%|██████████| 624975/624975 [00:25<00:00, 24285.56it/s]\n",
      "100%|██████████| 624975/624975 [00:23<00:00, 27103.38it/s]\n",
      "100%|██████████| 624990/624990 [00:22<00:00, 28030.21it/s]\n",
      "100%|██████████| 624990/624990 [00:21<00:00, 29596.51it/s]\n",
      "100%|██████████| 624990/624990 [00:25<00:00, 24618.71it/s]\n",
      "100%|██████████| 624990/624990 [00:27<00:00, 22984.46it/s]\n",
      "100%|██████████| 624990/624990 [00:27<00:00, 22831.90it/s]\n",
      "100%|██████████| 624945/624945 [02:57<00:00, 3513.18it/s]\n",
      " 96%|█████████▌| 601512/624990 [02:52<00:06, 3411.53it/s]\n",
      " 98%|█████████▊| 609704/624990 [02:54<00:04, 3469.84it/s]\n",
      "100%|██████████| 624975/624975 [02:58<00:00, 3494.41it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1512.62it/s]21.23it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1193.64it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 47671.57it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 3824.10it/s]5it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3541.40it/s]\n",
      "100%|██████████| 624990/624990 [02:58<00:00, 3498.77it/s]\n",
      "100%|██████████| 624990/624990 [02:57<00:00, 3520.31it/s]\n",
      "100%|██████████| 624975/624975 [02:57<00:00, 3514.79it/s]\n",
      "100%|██████████| 624975/624975 [02:58<00:00, 3501.60it/s]\n",
      "100%|██████████| 624990/624990 [02:58<00:00, 3492.93it/s]\n",
      "100%|██████████| 624990/624990 [02:58<00:00, 3497.36it/s]\n",
      "100%|██████████| 624990/624990 [02:58<00:00, 3498.91it/s]\n",
      "100%|██████████| 41666/41666 [00:25<00:00, 1631.72it/s]\n",
      "100%|██████████| 41666/41666 [00:26<00:00, 1593.92it/s]\n",
      "100%|██████████| 41666/41666 [00:26<00:00, 1584.02it/s]\n",
      "100%|██████████| 41666/41666 [00:26<00:00, 1570.06it/s]\n",
      "100%|██████████| 41666/41666 [00:26<00:00, 1578.59it/s]\n",
      "100%|██████████| 41666/41666 [00:26<00:00, 1550.84it/s]\n",
      "  4%|▎         | 1538/41666 [00:01<00:40, 998.20it/s] ]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1464.28it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1419.09it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1388.43it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1363.01it/s]\n",
      "100%|██████████| 41666/41666 [00:32<00:00, 1282.30it/s]\n",
      "100%|██████████| 41666/41666 [00:40<00:00, 1036.61it/s]\n",
      "100%|██████████| 41665/41665 [00:41<00:00, 1013.53it/s]s]\n",
      "100%|██████████| 41666/41666 [00:42<00:00, 984.33it/s] s]\n",
      "100%|██████████| 41666/41666 [00:42<00:00, 984.11it/s] \n",
      "100%|██████████| 41666/41666 [00:42<00:00, 983.31it/s] ]\n",
      "100%|██████████| 41663/41663 [00:42<00:00, 981.72it/s]]]]\n",
      "100%|██████████| 41662/41662 [00:43<00:00, 954.92it/s] /s]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 933.42it/s] s]]\n",
      "100%|██████████| 41666/41666 [00:43<00:00, 950.87it/s] \n",
      "100%|██████████| 41664/41664 [00:45<00:00, 925.46it/s] /s]\n",
      "100%|██████████| 41666/41666 [00:45<00:00, 923.10it/s]/s]]\n",
      "100%|██████████| 41666/41666 [00:47<00:00, 881.83it/s] s]]\n",
      " 58%|█████▊    | 361650/624960 [00:16<00:08, 30628.99it/s]\n",
      "100%|██████████| 624990/624990 [00:25<00:00, 24481.77it/s]\n",
      "100%|██████████| 624990/624990 [00:28<00:00, 21581.63it/s]\n",
      "100%|██████████| 624990/624990 [00:26<00:00, 23777.83it/s]\n",
      " 90%|████████▉ | 561871/624990 [00:20<00:02, 31303.78it/s]\n",
      "100%|██████████| 624990/624990 [00:24<00:00, 25672.01it/s]\n",
      "  2%|▏         | 13350/624990 [00:03<02:21, 4328.96it/s]s]\n",
      "100%|██████████| 624930/624930 [00:26<00:00, 23151.70it/s]\n",
      "100%|██████████| 624990/624990 [00:26<00:00, 23488.56it/s]\n",
      "100%|██████████| 624990/624990 [00:27<00:00, 22888.78it/s]\n",
      "100%|██████████| 624960/624960 [00:29<00:00, 21284.52it/s]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 624990/624990 [00:30<00:00, 20633.17it/s]\n",
      "100%|██████████| 624975/624975 [02:57<00:00, 3522.00it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1330.10it/s]01.99it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 990.36it/s]204.70it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 51500.71it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4361.76it/s]7it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3531.12it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3531.81it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3532.33it/s]\n",
      "100%|██████████| 624945/624945 [02:58<00:00, 3508.97it/s]\n",
      "100%|██████████| 624990/624990 [02:57<00:00, 3524.92it/s]\n",
      "100%|██████████| 624990/624990 [02:57<00:00, 3520.62it/s]\n",
      "100%|██████████| 624930/624930 [02:57<00:00, 3515.51it/s]\n",
      "100%|██████████| 624990/624990 [02:56<00:00, 3534.22it/s]\n",
      "100%|██████████| 624990/624990 [02:57<00:00, 3519.46it/s]\n",
      "100%|██████████| 624960/624960 [02:56<00:00, 3533.78it/s]\n",
      "100%|██████████| 624990/624990 [02:57<00:00, 3527.00it/s]\n",
      "100%|██████████| 41666/41666 [00:25<00:00, 1640.96it/s]\n",
      "100%|██████████| 41666/41666 [00:26<00:00, 1562.76it/s]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1447.76it/s]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1459.20it/s]\n",
      "100%|██████████| 41666/41666 [00:28<00:00, 1443.39it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1419.15it/s]\n",
      "100%|██████████| 41666/41666 [00:29<00:00, 1426.18it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1375.31it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1356.89it/s]\n",
      "100%|██████████| 41666/41666 [00:30<00:00, 1356.02it/s]\n",
      "100%|██████████| 41666/41666 [00:31<00:00, 1312.03it/s]\n",
      "100%|██████████| 41666/41666 [00:32<00:00, 1296.85it/s]\n",
      "100%|██████████| 41666/41666 [00:41<00:00, 1015.60it/s]\n",
      "100%|██████████| 41666/41666 [00:42<00:00, 989.24it/s] s]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 942.36it/s]]/s]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 936.61it/s]s]s]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 930.25it/s]t/s]\n",
      "100%|██████████| 41666/41666 [00:44<00:00, 941.30it/s] \n",
      "100%|██████████| 41666/41666 [00:45<00:00, 918.86it/s] s]]\n",
      "100%|██████████| 41664/41664 [00:45<00:00, 916.58it/s] s]]\n",
      "100%|██████████| 41665/41665 [00:46<00:00, 892.89it/s] /s]\n",
      "100%|██████████| 41666/41666 [00:47<00:00, 885.29it/s] /s]\n",
      " 24%|██▍       | 150692/624990 [00:05<00:15, 30715.21it/s]\n",
      "100%|██████████| 41666/41666 [00:47<00:00, 882.40it/s]/s]]\n",
      "100%|██████████| 624990/624990 [00:25<00:00, 24635.65it/s]\n",
      "100%|██████████| 624990/624990 [00:24<00:00, 25416.69it/s]\n",
      "100%|██████████| 624990/624990 [00:23<00:00, 26740.14it/s]\n",
      "100%|██████████| 624990/624990 [00:24<00:00, 25236.54it/s]\n",
      "100%|██████████| 624990/624990 [00:21<00:00, 29539.46it/s]\n",
      "100%|██████████| 624990/624990 [00:25<00:00, 24902.77it/s]\n",
      "100%|██████████| 624990/624990 [00:26<00:00, 23315.12it/s]\n",
      "100%|██████████| 624990/624990 [00:28<00:00, 22152.23it/s]\n",
      "100%|██████████| 624975/624975 [00:24<00:00, 25959.31it/s]\n",
      "100%|██████████| 624960/624960 [00:27<00:00, 22943.24it/s]\n",
      "100%|██████████| 624975/624975 [00:27<00:00, 22999.66it/s]\n",
      "100%|██████████| 624990/624990 [00:34<00:00, 18251.08it/s]\n",
      "100%|██████████| 624990/624990 [02:57<00:00, 3529.98it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1792.15it/s]98.07it/s]\n",
      "100%|██████████| 8/8 [00:00<00:00, 1278.95it/s]98.41it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 53715.74it/s]it/s]\n",
      "100%|██████████| 120/120 [00:00<00:00, 4400.35it/s]2it/s]\n",
      "100%|██████████| 624990/624990 [03:00<00:00, 3459.15it/s]\n",
      "100%|██████████| 624990/624990 [02:58<00:00, 3505.25it/s]\n",
      "100%|██████████| 624990/624990 [02:59<00:00, 3482.36it/s]\n",
      " 99%|█████████▉| 620423/624990 [02:59<00:01, 4011.70it/s]\n",
      "100%|██████████| 624990/624990 [03:00<00:00, 3465.53it/s]\n",
      "100%|██████████| 624975/624975 [02:58<00:00, 3494.97it/s]\n",
      "100%|██████████| 624990/624990 [03:00<00:00, 3457.23it/s]\n",
      "100%|██████████| 624960/624960 [02:59<00:00, 3486.65it/s]\n",
      "100%|██████████| 624975/624975 [03:00<00:00, 3471.02it/s]\n",
      "100%|██████████| 624990/624990 [03:09<00:00, 3293.63it/s]\n",
      "100%|██████████| 624990/624990 [02:58<00:00, 3510.31it/s]\n",
      "100%|██████████| 26057/26057 [00:16<00:00, 1608.05it/s]\n",
      "100%|██████████| 26057/26057 [00:16<00:00, 1554.93it/s]\n",
      "100%|██████████| 26057/26057 [00:17<00:00, 1519.52it/s]\n",
      "100%|██████████| 26057/26057 [00:17<00:00, 1509.47it/s]\n",
      "100%|██████████| 26057/26057 [00:17<00:00, 1490.48it/s]\n",
      "100%|██████████| 26057/26057 [00:18<00:00, 1416.69it/s]\n",
      "100%|██████████| 26057/26057 [00:19<00:00, 1347.40it/s]\n",
      "100%|██████████| 26057/26057 [00:19<00:00, 1346.87it/s]\n",
      "100%|██████████| 26057/26057 [00:19<00:00, 1316.30it/s]\n",
      "  3%|▎         | 758/26056 [00:00<00:20, 1232.54it/s]s]\n",
      "100%|██████████| 26057/26057 [00:20<00:00, 1281.35it/s]\n",
      "100%|██████████| 26057/26057 [00:20<00:00, 1256.59it/s]\n",
      "100%|██████████| 26055/26055 [00:26<00:00, 995.26it/s] \n",
      "100%|██████████| 26053/26053 [00:26<00:00, 986.72it/s] s]\n",
      "100%|██████████| 26057/26057 [00:27<00:00, 961.32it/s] s]\n",
      "100%|██████████| 26057/26057 [00:27<00:00, 957.91it/s] s]\n",
      "100%|██████████| 26056/26056 [00:27<00:00, 952.97it/s] s]\n",
      "100%|██████████| 26056/26056 [00:28<00:00, 925.82it/s] /s]\n",
      "100%|██████████| 26056/26056 [00:28<00:00, 921.16it/s] s]]\n",
      "100%|██████████| 26057/26057 [00:28<00:00, 911.32it/s]/s]]\n",
      " 92%|█████████▏| 24012/26057 [00:28<00:01, 1062.91it/s]s]]\n",
      "100%|██████████| 26057/26057 [00:29<00:00, 882.56it/s]t/s]\n",
      "100%|██████████| 26057/26057 [00:30<00:00, 866.57it/s] /s]\n",
      "100%|██████████| 26057/26057 [00:30<00:00, 845.29it/s]t/s]\n",
      "100%|██████████| 390825/390825 [00:16<00:00, 23852.14it/s]\n",
      "100%|██████████| 390855/390855 [00:16<00:00, 23688.61it/s]\n",
      "100%|██████████| 390855/390855 [00:17<00:00, 22303.71it/s]\n",
      "100%|██████████| 390840/390840 [00:15<00:00, 25849.75it/s]\n",
      "100%|██████████| 390795/390795 [00:19<00:00, 19628.71it/s]\n",
      "100%|██████████| 390840/390840 [00:19<00:00, 19736.70it/s]\n",
      "100%|██████████| 390855/390855 [00:15<00:00, 24676.04it/s]\n",
      "100%|██████████| 390840/390840 [00:18<00:00, 20741.92it/s]\n",
      "100%|██████████| 390855/390855 [00:19<00:00, 20467.30it/s]\n",
      "100%|██████████| 390855/390855 [00:18<00:00, 21033.77it/s]\n",
      "100%|██████████| 390855/390855 [00:17<00:00, 21786.83it/s]\n",
      "100%|██████████| 390855/390855 [00:20<00:00, 19430.73it/s]\n",
      "100%|██████████| 390825/390825 [01:50<00:00, 3544.35it/s]\n",
      "100%|██████████| 2/2 [00:00<00:00, 5433.04it/s]11.53it/s]\n",
      "100%|██████████| 2/2 [00:00<00:00, 3053.73it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 67001.66it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 2386.16it/s].51it/s]\n",
      "100%|██████████| 390855/390855 [01:50<00:00, 3535.86it/s]\n",
      "100%|██████████| 390855/390855 [01:50<00:00, 3533.57it/s]\n",
      "100%|██████████| 390840/390840 [01:50<00:00, 3537.57it/s]\n",
      "100%|██████████| 390795/390795 [01:50<00:00, 3547.70it/s]\n",
      "100%|██████████| 390855/390855 [01:50<00:00, 3528.02it/s]\n",
      "100%|██████████| 390840/390840 [01:51<00:00, 3502.64it/s]\n",
      "100%|██████████| 390840/390840 [01:51<00:00, 3509.45it/s]\n",
      "100%|██████████| 390855/390855 [01:50<00:00, 3521.31it/s]\n",
      "100%|██████████| 390855/390855 [01:51<00:00, 3510.23it/s]\n",
      "100%|██████████| 390855/390855 [01:50<00:00, 3522.49it/s]\n",
      "100%|██████████| 390855/390855 [01:51<00:00, 3517.81it/s]\n"
     ]
    }
   ],
   "source": [
    "import json\n",
    "import multi\n",
    "\n",
    "batch_size = 500000\n",
    "\n",
    "for pair in pairs:\n",
    "    with open(pair) as fopen:\n",
    "        data = json.load(fopen)\n",
    "    \n",
    "    part = 0\n",
    "    for i in range(0, len(data['left']), batch_size):\n",
    "        index = min(i + batch_size, len(data['left']))\n",
    "        l = data['left'][i: index]\n",
    "        r = data['right'][i: index]\n",
    "        filename = f'{pair}-part-{part}'\n",
    "\n",
    "        multi.multiprocessing(chunks_multiple(list(zip(l, r)), len(l) // 12, filename), get_inputs)\n",
    "        part += 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
